<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
    <title>奖惩详情</title>
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/weui.min.css">
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/system/main.css?v=2018050801">
</head>
<body ontouchstart>
<div class="index-review punish-detail">
    <div class="header-bk">
        <div class="con-head">
            <img @if(empty($us->logo)) src="../../images/system/ps1.png" @else src="{{url($us->logo)}}" @endif><span class="user-name">{{getUserName($uid)}}</span>
            <div class="f-right">
                <p class="p-reward"><span class="circle-s"></span>奖励<span class="mon-num">@if(!empty($perf))+{{$perf->award_score}}@endif</span></p>
                <p class="p-punish"><span class="circle-s"></span>惩罚<span class="mon-num">@if(!empty($perf))-{{$perf->punish_score}}@endif</span></p>
            </div>
        </div>
    </div>
    <div class="punish-tab">
        <div class="weui-tab">
            <div class="weui-navbar">
                <a class="weui-navbar__item weui-bar__item--on" href="#tab1">
                    <img src="../../images/system/good.png" style="width: 0.6rem">
                    <p>我的奖励</p>
                </a>
                <a class="weui-navbar__item" href="#tab2">
                    <img src="../../images/system/bad.png" style="width: 0.6rem">
                    <p>我的惩罚</p>
                </a>
            </div>
            <div class="weui-tab__bd">
                <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
                    @if(!empty($reward))
                        @foreach($reward as $r)
                            <div class="mon-sec">
                                <h3>{{$r->created_at->format('Y-m')}}<span>奖励</span></h3>
                                <div class="initiator-per">
                                    <p class="left-p">发起人：{{getUserName($r->from_user_id)}}</p>
                                    <p>{{$r->reason}}</p>
                                </div>
                                <p class="level-bk">{{$r->grade}}</p>
                            </div>
                        @endforeach
                    @endif
                    {{--<div class="mon-sec">
                        <h3>2018-04<span>奖励</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">中级</p>
                    </div>
                    <div class="mon-sec">
                        <h3>2018-04<span>奖励</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">低级</p>
                    </div>
                    <div class="mon-sec">
                        <h3>2018-04<span>奖励</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">高级</p>
                    </div>--}}
                </div>
                <div id="tab2" class="weui-tab__bd-item">
                    @if(!empty($reward))
                        @foreach($reward as $r)
                            <div class="mon-sec">
                                <h3>{{$r->created_at->format('Y-m')}}<span>惩罚</span></h3>
                                <div class="initiator-per">
                                    <p class="left-p">发起人：{{getUserName($r->from_user_id)}}</p>
                                    <p>{{$r->reason}}</p>
                                </div>
                                <p class="level-bk">{{$r->grade}}</p>
                            </div>
                        @endforeach
                    @endif
                    {{--<div class="mon-sec">
                        <h3>2018-04<span>惩罚</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">高级</p>
                    </div>
                    <div class="mon-sec">
                        <h3>2018-04<span>惩罚</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">中级</p>
                    </div>
                    <div class="mon-sec">
                        <h3>2018-04<span>惩罚</span></h3>
                        <div class="initiator-per">
                            <p class="left-p">发起人：王 莹</p>
                            <p>本月销售要求为XXX万元，月中需达到XXX万元</p>
                        </div>
                        <p class="level-bk">低级</p>
                    </div>--}}
                </div>
            </div>
        </div>
    </div>
    <div class="show-hidden">
        <ul>
            <li><a href="{{url('/user/performance/detail')}}"><img src="../../images/system/user.png">我的考评</a></li>
            <li><a href="{{url('/user/performance/index')}}"><img src="../../images/system/all.png">全员考评</a></li>
            <li><a href="{{url('/user/performance/month')}}"><img src="../../images/system/message.png">月度意见</a></li>
        </ul>
    </div>
    <div class="reful-tabbar">
        <a href="javascript:void(0)" class="find-link tabbar-item active">
            <div class="img-div">
            </div>
            <p class="tabbar-label">考评</p>
        </a>
        <a href="{{url('/user/message')}}" class="message-center tabbar-item">
            <div class="img-div">
            </div>
            <p class="tabbar-label">消息中心</p>
        </a>
        <a href="{{url('/user/reward')}}" class="reward-punishment tabbar-item">
            <div class="img-div">
            </div>
            <p class="tabbar-label">奖励惩罚</p>
        </a>
        <a href="{{url('/user/setting')}}" class="set-up tabbar-item">
            <div class="img-div">
            </div>
            <p class="tabbar-label">设置</p>
        </a>
    </div>
    <script src="/js/jquery-2.1.4.min.js"></script>
    <script src="/addons/jquery-weui-build/js/fastclick.js"></script>
    <script>
        $(function() {
            document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
            FastClick.attach(document.body);
        });
    </script>
    <script src="/addons/jquery-weui-build/js/jquery-weui.min.js"></script>
    <script>
        $('.find-link').click(function () {
            $('.show-hidden').toggle();
        });
    </script>
</body>
</html>